<?php

command('coinmarket:get-from-coinmarketcap', '从 coinmarketcap 获取 coinmarket 数据', function () {

    queue_push('get_coin_market_from_coinmarketcap');

});

command('coinmarket:rank-rise', '计算排行变更', function () {

    queue_push('rank_daily_rise');
    queue_push('rank_weekly_rise');

});

command('coinmarket:clean-early', '清除较早的数据', function () {

    db_simple_delete('coin_market', ['record_time <' => datetime('-1 weeks -1 days')]);

});
